import Student from "../Student";
import './index.css';
import StudentForm from "../StudentForm";

const StudentList = (props) => {
	return (
		<table>
			<caption>学生信息列表</caption>
			<thead>
			<tr>
				<th>姓名</th>
				<th>性别</th>
				<th>年龄</th>
				<th>地址</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			{props.stuList.map(stu => {
				return (
					<Student key={stu.id} stu={stu} />
				)
			})}
			</tbody>
			<tfoot>
				<StudentForm />
			</tfoot>
		</table>
	)
}

export default StudentList;